﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rest.aspx.cs" Inherits="Demo.rest" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="Content/login.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="page">
		    <div class="loginwarrp">
			    <div class="logo">用户注册</div>
			    <div class="login_form">
				
					    <ul>
						    <li class="login-item"><span>用户名：</span>
                                <asp:TextBox ID="txtUser" runat="server" class="login_input"></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="输入用户名" Text="*" ControlToValidate="txtUser" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="此用户名已经存在" ControlToValidate="txtUser" Display="Dynamic" ForeColor="Red" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                            </li>
						    <li class="login-item"><span>密 码：</span> 
                                <asp:TextBox ID="txtPwd" runat="server" class="login_input" TextMode="Password"></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="输入密码" Text="*" ControlToValidate="txtPwd" ForeColor="Red"></asp:RequiredFieldValidator>
						    </li>
                            <li class="login-item"><span>确认密码：</span> 
                                <asp:TextBox ID="txtPwdSet" runat="server" class="login_input" TextMode="Password"></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="输入密码" Text="*" ControlToValidate="txtPwdSet" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码不一致" ForeColor="Red" ControlToCompare="txtPwd" ControlToValidate="txtPwdSet" Display="Dynamic"></asp:CompareValidator>
                            </li>
                            <li class="login-item"><span>输入年龄：</span> 
                                <asp:TextBox ID="txtAge" runat="server" class="login_input" ></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="输入年龄" Text="*" ControlToValidate="txtAge" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄在18-120之间" ControlToValidate="txtAge" Display="Dynamic" ForeColor="Red" Type="Integer" MaximumValue="120" MinimumValue="18"></asp:RangeValidator>
                            </li>
                             <li class="login-item"><span>输入邮箱：</span> 
                                <asp:TextBox ID="txtEmail" runat="server" class="login_input" ></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="输入邮箱" Text="*" ControlToValidate="txtEmail" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="邮箱格式有误(***@**.com)" ControlToValidate="txtEmail" Display="Dynamic" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            </li>
						    <li class="login-sub">
                                <asp:Button ID="btnOK" runat="server" Text="注册" OnClick="btnOK_Click"  />
                                <input type="reset" name="Reset" value="重置" />
						    </li>
                            <li class="login-item">
                                <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="#CC0000"></asp:Label>
                                
						    </li>
                            <li class="login-item">
                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
						    </li>
					    </ul>
				
			    </div>
		    </div>
	    </div>
    </form>
</body>
</html>
